<?php
/**
 * 公司管理
 * User: 91336
 * Date: 13-11-20
 * Time: 上午11:39
 */
class CompanyAction extends OauthAction
{
    protected $cat_mode; //行业分类数据对象
    function _initialize(){
        parent::_initialize();
        $this->_mode = D('Company');
        $this->cat_mode = D('CompanyCategory');
    }

    public function _before_index(){
        if($_SERVER['QUERY_STRING'] == 'datagrid'){
            die(json_encode_format($this->_mode->fetch_datagrid()));
        }
    }
}